package com.lianrui.app.member.domain;

import java.util.Date;

import javax.persistence.Table;

import org.apache.commons.lang.StringUtils;

import com.lianrui.core.Domain;

/**
 * 主体信息实体
 * 
 * @ClassName: Subject <br/>
 * @Function: TODO ADD FUNCTION. <br/>
 * @Reason: TODO ADD REASON(可选). <br/>
 * @date: 2016年1月19日 上午11:53:37 <br/>
 * 
 * @author Yefq
 * @version
 *
 */
@Table(name = "es_subject")
public class Subject extends Domain<Integer> {

	private static final long serialVersionUID = 1L;

	@Override
    public Integer getId() {
        // TODO Auto-generated method stub
        return subject_id;
    }

    @Override
    public void setId(Integer id) {
        this.subject_id = id;

    }

    private Integer subject_id; // 主体信息ID
    private Integer is_company; // 0:是公司;1是个人
    private Integer is_default; // 是否为默认主体信息: 0:不是默认;1是默认

    private Integer member_id;// 用户ID
    private Integer company_nationality; // 公司-国籍:1表示中国；2表示港澳台地区；3表示国外
    private String company_phone; // 公司-联系电话
    private String company_name; // 公司-名称
    private String company_address; // 公司-地址
    private String company_license_no; // 公司-营业执照号
    private String company_license_pic; // 公司-营业执照扫描件
    private String company_email; // 公司-联系邮箱
    private Integer company_province_id; // 公司-收文地址省ID
    private String company_province; // 公司-收文地址省名字
    private Integer company_city_id; // 公司-收文地址市ID
    private String company_city; // 公司-收文地址市名字
    private Integer company_region_id; // 公司-收文地址区ID
    private String company_region; // 公司-收文地址区名字
    private String company_detail_address; // 公司-详细地址
    private String company_linkman; // 公司-收文联系人
    private String company_mobile; // 公司-收文联系人电话

    private String unit_name; // 个体-个人姓名
    private String unit_phone; // 个体-联系电话

    private String unit_identity_card; // 个体-身份证号
    private String unit_identity_card_pic_front; // 个体-身份证正面照
    private String unit_identity_card_pic_back; // 个体-身份证反面照
    private String unit_email; // 个体-联系邮箱
    private Integer unit_province_id; // 个体-联系地址省ID
    private String unit_province; // 个体-联系地址省名字
    private Integer unit_city_id; // 个体-联系地址市ID
    private String unit_city; // 个体-联系地址市名字
    private Integer unit_region_id; // 个体-联系地址区ID
    private String unit_region; // 个体-联系地址区名字
    private String unit_address; // 个体-详细地址
    private String unit_linkman; // 个体-收文联系人
    private String unit_mobile; // 个体-收文联系人电话

    private Date create_time; // 创建时间
    private Date last_update_time; // 最后修改时间

    private String getDataAddress(String s) {
        if (StringUtils.isNotBlank(s)) {
            if ("0".equals(s.trim()) || "-1".equals(s.trim())
                    || "请选择".equals(s.trim())) {
                return "";
            } else {
                return s.trim();
            }
        }
        return "";

    }

    public String getUnit_phone() {
        return unit_phone;
    }

    public void setUnit_phone(String unit_phone) {
        this.unit_phone = unit_phone;
    }

    public Integer getSubject_id() {
        return subject_id;
    }

    public void setSubject_id(Integer subject_id) {
        this.subject_id = subject_id;
    }

    public Integer getIs_company() {
        return is_company;
    }

    public void setIs_company(Integer is_company) {
        this.is_company = is_company;
    }

    public Integer getIs_default() {
        return is_default;
    }

    public void setIs_default(Integer is_default) {
        this.is_default = is_default;
    }

    public Integer getMember_id() {
        return member_id;
    }

    public void setMember_id(Integer member_id) {
        this.member_id = member_id;
    }

    public Integer getCompany_nationality() {
        return company_nationality;
    }

    public void setCompany_nationality(Integer company_nationality) {
        this.company_nationality = company_nationality;
    }

    public String getCompany_phone() {
        return company_phone;
    }

    public void setCompany_phone(String company_phone) {
        this.company_phone = company_phone;
    }

    public String getCompany_name() {
        return company_name;
    }

    public void setCompany_name(String company_name) {
        this.company_name = company_name;
    }

    public String getCompany_address() {
        return company_address;
    }

    public void setCompany_address(String company_address) {
        this.company_address = company_address;
    }

    public String getCompany_license_no() {
        return company_license_no;
    }

    public void setCompany_license_no(String company_license_no) {
        this.company_license_no = company_license_no;
    }

    public String getCompany_license_pic() {
        return company_license_pic;
    }

    public void setCompany_license_pic(String company_license_pic) {
        this.company_license_pic = company_license_pic;
    }

    public String getCompany_email() {
        return company_email;
    }

    public void setCompany_email(String company_email) {
        this.company_email = company_email;
    }

    public Integer getCompany_province_id() {
        return company_province_id;
    }

    public void setCompany_province_id(Integer company_province_id) {
        this.company_province_id = company_province_id;
    }

    public String getCompany_province() {
        return getDataAddress(company_province);
    }

    public void setCompany_province(String company_province) {
        this.company_province = company_province;
    }

    public Integer getCompany_city_id() {
        return company_city_id;
    }

    public void setCompany_city_id(Integer company_city_id) {
        this.company_city_id = company_city_id;
    }

    public String getCompany_city() {
        return getDataAddress(company_city);
    }

    public void setCompany_city(String company_city) {
        this.company_city = company_city;
    }

    public Integer getCompany_region_id() {
        return company_region_id;
    }

    public void setCompany_region_id(Integer company_region_id) {
        this.company_region_id = company_region_id;
    }

    public String getCompany_region() {

        return getDataAddress(company_region);
    }

    public void setCompany_region(String company_region) {
        this.company_region = company_region;
    }

    public String getCompany_detail_address() {
        return company_detail_address;
    }

    public void setCompany_detail_address(String company_detail_address) {
        this.company_detail_address = company_detail_address;
    }

    public String getCompany_linkman() {
        return company_linkman;
    }

    public void setCompany_linkman(String company_linkman) {
        this.company_linkman = company_linkman;
    }

    public String getCompany_mobile() {
        return company_mobile;
    }

    public void setCompany_mobile(String company_mobile) {
        this.company_mobile = company_mobile;
    }

    public String getUnit_name() {
        return unit_name;
    }

    public void setUnit_name(String unit_name) {
        this.unit_name = unit_name;
    }

    public String getUnit_identity_card() {
        return unit_identity_card;
    }

    public void setUnit_identity_card(String unit_identity_card) {
        this.unit_identity_card = unit_identity_card;
    }

    public String getUnit_identity_card_pic_front() {
        return unit_identity_card_pic_front;
    }

    public void setUnit_identity_card_pic_front(
            String unit_identity_card_pic_front) {
        this.unit_identity_card_pic_front = unit_identity_card_pic_front;
    }

    public String getUnit_identity_card_pic_back() {
        return unit_identity_card_pic_back;
    }

    public void setUnit_identity_card_pic_back(
            String unit_identity_card_pic_back) {
        this.unit_identity_card_pic_back = unit_identity_card_pic_back;
    }

    public String getUnit_email() {
        return unit_email;
    }

    public void setUnit_email(String unit_email) {
        this.unit_email = unit_email;
    }

    public Integer getUnit_province_id() {
        return unit_province_id;
    }

    public void setUnit_province_id(Integer unit_province_id) {
        this.unit_province_id = unit_province_id;
    }

    public String getUnit_province() {
        return getDataAddress(unit_province);
    }

    public void setUnit_province(String unit_province) {
        this.unit_province = unit_province;
    }

    public Integer getUnit_city_id() {
        return unit_city_id;
    }

    public void setUnit_city_id(Integer unit_city_id) {
        this.unit_city_id = unit_city_id;
    }

    public String getUnit_city() {
        return getDataAddress(unit_city);
    }

    public void setUnit_city(String unit_city) {
        this.unit_city = unit_city;
    }

    public Integer getUnit_region_id() {
        return unit_region_id;
    }

    public void setUnit_region_id(Integer unit_region_id) {
        this.unit_region_id = unit_region_id;
    }

    public String getUnit_region() {
        return getDataAddress(unit_region);
    }

    public void setUnit_region(String unit_region) {
        this.unit_region = unit_region;
    }

    public String getUnit_address() {
        return unit_address;
    }

    public void setUnit_address(String unit_address) {
        this.unit_address = unit_address;
    }

    public String getUnit_linkman() {
        return unit_linkman;
    }

    public void setUnit_linkman(String unit_linkman) {
        this.unit_linkman = unit_linkman;
    }

    public String getUnit_mobile() {
        return unit_mobile;
    }

    public void setUnit_mobile(String unit_mobile) {
        this.unit_mobile = unit_mobile;
    }

    public Date getCreate_time() {
        return create_time;
    }

    public void setCreate_time(Date create_time) {
        this.create_time = create_time;
    }

    public Date getLast_update_time() {
        return last_update_time;
    }

    public void setLast_update_time(Date last_update_time) {
        this.last_update_time = last_update_time;
    }

}
